<script type="text/javascript">
 	$(document).ready(function(){
 		server.setPre();
		setInterval("server.setPre();",5000);
	});	
</script>

<form method="post" id="showClusterInfo">
	<div class="main_right_content">
		<table class="table table-hover">
			<tbody>
				<tr>
					<th style="width: 25%;" scope="row" class="oddrow"><@spring.message
						code='server.manufacturer'/></th>
					<td style="width: 75%;">${server.manufacturer}</td>
				</tr>
				<tr>
					<th scope="row" class="oddrow"><@spring.message
						code='server.dminfo'/></th>
					<td>${server.dmInfo}</td>
				</tr>
				<tr>
					<th scope="row" class="oddrow"><@spring.message
						code='server.osinfo'/></th>
					<td>${server.osInfo}</td>
				</tr>
				<tr>
					<th scope="row" class="oddrow"><@spring.message
						code='server.cpuinfo'/></th>
					<td>${server.cpuInfo}</td>
				</tr>
				<tr>
					<th scope="row" class="oddrow"><@spring.message
						code='server.cpuused'/></th>
					<td>
						<div id="CPUPre" class="easyui-progressbar" style="width: 200px;"></div>
					</td>
				</tr>
				<tr>
					<th scope="row" class="oddrow"><@spring.message
						code='server.memoryinfo'/></th>
					<td>${server.memoryInfo}</td>
				</tr>
				<tr>
					<th scope="row" class="oddrow"><@spring.message
						code='server.memoryused'/></th>
					<td>
						<div id="MemPre" class="easyui-progressbar" style="width: 200px;"></div>
					</td>
				</tr>
			</tbody>
		</table>


		<table class="table table-striped table-hover">
			<caption><@spring.message code='server.diskinfo'/></caption>
			<thead>
				<tr>
					<th width="35%" scope="col"><@spring.message
						code='server.model'/></th>
					<th width="20%" scope="col"><@spring.message
						code='server.diskname'/></th>
					<th width="15%" scope="col"><@spring.message
						code='server.capacity'/></th>
					<th width="15%" scope="col"><@spring.message
						code='server.partition'/></th>
					<th width="20%" scope="col"><@spring.message
						code='server.addosd'/></th>
				</tr>
			</thead>
			<tbody>
				<#list DiskInfo as item>
				<tr
					<#if ((item_index+1) % 2 == 0) >class="oddrow"</#if>>
						<td>${item.model}</td>
						<td>${item.diskName}</td>
					    <td>${item.capacity}</td>
					    <td><a id="partitionDetail" class="s_btnwork xm_zh_btn"  onclick="server.partition(this)" diskname="${item.diskName}" serverid="${server.mgmtAddr}">...</a></td>
        				<#list PartitionInfo as par>
        					<#if par.diskId == item.diskId>        					
        						<#if par.description?substring(0,4) =='["os'>        						
        							<td vertical="middle"><@spring.message code='server.systemDisk'/></td>
        							<#break>
        						<#elseif par.description?substring(0,5) =='["tds'>
        							<td vertical="middle"><@spring.message code='server.addosd'/></td>
        							<#break>
								<#else>
									<td><a class="btn btn-primary btn-xs btn-success" onclick="server.addosd(this)" diskname="${item.diskName}" mgmtAddr="${server.mgmtAddr}" pubAddr="${server.pubAddr}"><@spring.message code='server.addosd'/></a></td>
									<#break>
        						</#if>
        					</#if>      					
        				</#list>  
        				<td></td>     						
					</tr>
				</#list>
			</tbody>
		</table>


		<table class="table table-striped table-hover">
			<caption><@spring.message code='server.nicinfo'/></caption>
			<thead>
				<tr>
					<th width="30%" scope="col"><@spring.message
						code='server.nicname'/></th>
					<th width="30%" scope="col"><@spring.message
						code='server.ipaddress'/></th>
					<th width="40%" scope="col"><@spring.message
						code='server.macaddress'/></th>
				</tr>
			</thead>
			<tbody>
				<#list IpInfo as item>
				<tr
					<#if ((item_index+1) % 2 == 0) >class="oddrow"</#if>>
					<td>${item.nicName}</td>
					    <td>${item.ipAddr}</td>
					    <td>${item.macAddr}</td>        
					</tr>
				</#list>
			</tbody>
		</table>
	</div>
</form>